﻿using FB.Providers.EmployeeInfo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace FB.Providers
{
   public static class EmployeeTypeManager
    {
       // #region Employee Type 員工種類
       //public static EmployeeInfoUnit EmployeeInfoUnit
       //{
       //    get
       //    {
       //        var EF = AspNetEmployeeInfoProviderManager.Default as EFEmployeeInfoProvider;
       //        if (null != EF)
       //        {
       //            return EF.GetEmployeeInfoUnit();
       //        }
       //        return null;
       //    }
       //}

       // public static EmployeeType GetEmployeeType(string EMPType)
       // {
       //     EmployeeInfoUnit infounit = EmployeeInfoUnit;
       //     var query = infounit.EmployeeTypeRepository.Get(t => t.EMPType == EMPType);
       //      return query.FirstOrDefault(); 
       // }

       // public static List<EmployeeType> GetAllEmployeeTypes()
       // {
       //     EmployeeInfoUnit infounit = EmployeeInfoUnit;
       //     return infounit.EmployeeTypeRepository.Get(null).ToList();
            
       // }

       // public static List<EmployeeType> FindEmployeeTypes(Expression<Func<EmployeeType, bool>> filter = null)
       // {
       //     EmployeeInfoUnit infounit = EmployeeInfoUnit;
       //     return infounit.EmployeeTypeRepository.Get(filter).ToList();
            
       // }

       // public static EmployeeType CreateEmployeeType(EmployeeType employeeType, uint initialSeqNumber = 0)
       // {
       //     EmployeeInfoUnit infounit = EmployeeInfoUnit;
       //     employeeType.Sequence = new Sequence { CurrentValue = initialSeqNumber };
       //     infounit.EmployeeTypeRepository.Insert(employeeType);
       //     infounit.SaveChanges();
       //     return employeeType;
       // }

       // public static void UpdateEmployeeType(EmployeeType employeeType)
       // {
       //     EmployeeInfoUnit infounit = EmployeeInfoUnit;
       //     infounit.EmployeeTypeRepository.Update(employeeType);
       //     infounit.SaveChanges(); 
          
       // }

       // public static void DeleteEmployeeType(string EMPType)
       // {
       //     EmployeeInfoUnit infounit = EmployeeInfoUnit;
       //     infounit.EmployeeTypeRepository.Delete(EMPType);
       //     infounit.SaveChanges();
       // }

       // public static List<EmployeeType> FindEmployeeTypes(
       //    Expression<Func<EmployeeType, bool>> filter,
       //    Func<IQueryable<EmployeeType>, IOrderedQueryable<EmployeeType>> orderBy,
       //    int pageIndex, int pageSize, out int totalRecords)
       // {
       //     EmployeeInfoUnit infounit = EmployeeInfoUnit;
       //     return infounit.EmployeeTypeRepository.GetPagedList(filter, orderBy, pageIndex, pageSize, out totalRecords).ToList();
            
       // }
       // #endregion 
    }
}
